<?php 
/* SVN FILE: $Id: search.ctp 70 2007-12-09 23:29:53Z joe.vasquez $ */
/**
 * scriptures search
 * @filesource
 * @author			Joe Vasquez <joe.vasquez@gmail.com>
 * @copyright		Copyright (c) 2007, Joe Vasquez
 * @package			redlettr
 * @subpackage		scriptures
 * @since			0.1A
 * @version			0.1A  $Rev: 70 $
 * @lastmodified	$Date: 2007-12-09 23:29:53 +0000 (Sun, 09 Dec 2007) $
 * @license			http://www.opensource.org/licenses/mit-license.php The MIT License
 */
?>
<?php echo $form->create(
	'Scripture',
	array(
		'class'		=> 'block-labels',
		'action'	=> 'search',
		'id'		=> 'scriptureSearch'
	)
);?>
<?php echo $form->input('q',
	array(
		'type'	=> 'text',
		'label'	=> 'Search',
		'class'	=> 'textInput'
	)
); ?>
<div id="advancedSearchFields">
<?php echo $form->input('not-words',
	array(
		'type'	=> 'text',
		'label'	=> 'Not Words',
		'class'	=> 'textInput'
	)
); ?>
<?php echo $form->input('scope',
	array(
		'type'		=> 'select',
		'label'		=> 'Scope',
		'options'	=> $esv->getScopeOptions(),
		'class'	=> 'textInput'
	)
); ?>
<?php echo $form->input('matches',
	array(
		'type'		=> 'select',
		'label'		=> 'Matches',
		'options'	=> $esv->getMatchesOptions(),
		'class'	=> 'textInput'
	)
); ?>
<?php echo $form->input('searchtext',
	array(
		'type'		=> 'select',
		'label'		=> 'Search Text',
		'options'	=> $esv->getSearchText(),
		'class'	=> 'textInput'
	)
); ?>
</div>
<?php echo $form->end(
	array(
		'submit'	=> 'Search',
		'options'	=> array(
			'div'	=> 'search'
		)
	)
); ?>
<div class="results">
<?php if(isset($results)): ?>
<?php echo $results; ?>
<?php endif; ?>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$('div#advancedSearchFields').hide();
	$(':submit').after(' <a href="#" class="searchToggle-closed" id="advanceSearchToggle">Advanced Search</a>');
	$('a#advanceSearchToggle').click(function(){
		$('div#advancedSearchFields').slideToggle();
		$(this).toggleClass('searchToggle-closed').toggleClass('searchToggle-opened');
		return false;
	});
});
</script>